import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    Aname:sessionStorage.getItem('Aname'),
  },
  mutations: {
    UpdateName(state,name){
      this.state.Aname = name
      if(name==null){
        sessionStorage.removeItem('Aname')
        // sessionStorage.removeItem('UserID')
        // this.state.Uname=name
      }else{
        sessionStorage.setItem("Aname",name)
      }
    },
  },
  actions: {
  },
  modules: {
  }
})
